package org.dromara.hotel.domain.bo;

import org.dromara.hotel.domain.TerPricingRule;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 酒店价格规则业务对象 ter_pricing_rule
 *
 * @author xch
 * @date 2025-06-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TerPricingRule.class, reverseConvertGenerate = false)
public class TerPricingRuleBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long roomId;

    /**
     * 规则类型
     */
    private String ruleType;

    /**
     * 规则生效开始日期
     */
    @NotNull(message = "规则生效开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startDate;

    /**
     * 规则生效结束日期
     */
    @NotNull(message = "规则生效结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endDate;

    /**
     * 条件表达式
     */
    private String conditionJson;

    /**
     * 计算公式
     */
    private String formula;

    /**
     * 优先级
     */
    private Integer priority;

    private Long hotelId;
    private String hotelName;

    /**
     * 是否有效
     */
    @NotNull(message = "是否有效不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long isActive;

    private String roomType;

}
